Function Reference

_IENavigate

Directs an existing browser window to navigate to the specified URL.

#include <IE.au3>
_IENavigate ( ByRef $o_object, $s_url [, $f_wait = 1] )

 

Parameters

$o_object Object variable of an InternetExplorer.Application, Window or Frame object
$s_url URL to navigate to (e.g. "http://www.autoitscript.com")
$f_wait Optional: specifies whether to wait for page to load before returning
0 = Return immediately, not waiting for page to load
1 = (Default) Wait for page load to complete before returning

 

Return Value

Success: Returns -1
Failure: Returns 0 and sets @ERROR
@Error: 0 ($_IEStatus_Success) = No Error
1 ($_IEStatus_GeneralError) = General Error
3 ($_IEStatus_InvalidDataType) = Invalid Data Type
4 ($_IEStatus_InvalidObjectType) = Invalid Object Type
6 ($_IEStatus_LoadWaitTimeout) = Load Wait Timeout
8 ($_IEStatus_AccessIsDenied) = Access Is Denied
@Extended: Contains invalid parameter number

 

Remarks

This function always returns a value of -1. This is because the navigate method has no return value and therefore nothing can be implied from it. You will need to employ other methods to determine success or failure of the navigation.

 

Related

_IECreate

 

Example


; *******************************************************
; Example 1 - Create a browser window and navigate to a website,
;               wait 5 seconds and navigate to another
;               wait 5 seconds and navigate to another
; *******************************************************
;
#include <IE.au3>
$oIE = _IECreate ("www.autoitscript.com")
Sleep(5000)
_IENavigate ($oIE, "http://www.autoitscript.com/forum/index.php?")
Sleep(5000)
_IENavigate ($oIE, "http://www.autoitscript.com/forum/index.php?showforum=9")

; *******************************************************
; Example 2 - Create a browser window and navigate to a website,
;               do not wait for page load to complete before moving to next line
; *******************************************************
;
#include <IE.au3>
$oIE = _IECreate ("www.autoitscript.com", 0)
MsgBox(0, "_IENavigate()", "This code executes immediately")